package de.westranger.forex.trading.genetic.allel.selection;

import java.util.Comparator;

import de.westranger.forex.trading.genetic.allel.chromosom.Chromosom;

public final class ChromosomComparator implements Comparator<Chromosom> {

	@Override
	public int compare(final Chromosom chrom0,final Chromosom chrom1) {
		int result = 0;
		if(chrom0.getFitness() > chrom1.getFitness()){
			result = 1;
		}else if(chrom0.getFitness() < chrom1.getFitness()){
			result = -1;
		}
		return result;
	}

}
